 Private Sub ShowMatrix()
    ' Przeznaczenie: Procedura ta wywietla macierz
    Dim i, j, k, offset, sum As Integer
    Dim Coor As Point

    sum = 0
    k = 1
    offset = 80            ' Liczba pikseli od krawdzi
    For i = 0 To MatrixSize - 1    ' wiersze
      For j = 0 To MatrixSize - 1   ' kolumny
        Coor.X = 30 * j + 12     ' Pozycja
        Coor.Y = offset
        With txtElement(k)
          .Location = Coor ' Okrelenie lokalizacji
          .Text = CStr(Magic(i + 1, j + 1, MatrixSize))
          .Visible = True
        End With
        k += 1
      Next j
      sum += CInt(txtElement(i + 1).Text)
      offset += 20
    Next i

    txtMagicNumber.Text = CStr(sum)
    txtMagicNumber.Visible = True
    lblMagicNumber.Visible = True

  End Sub
